<rich:modalPanel id="messagePanel" showWhenRendered="#{messageController.showWhenRendered}" 
                 minWidth="400" minHeight="100" onhide="true" autosized="true" top="200" >

    <a4j:form id="modalForm">
        <h:panelGroup id="messagePanelGroup">
			<h:inputHidden id="showMessageModalPanel"
				value="#{messageController.message}" />
			<h:inputHidden id="clearReRender"
				value="#{messageController.reRender}" />
            <h:panelGrid columns="1" style="text-align: center;">
                <a4j:outputPanel id="msgPanelOutPut" layout="block">
                    <h:panelGrid columns="2" style="text-align: left;">
						<h:graphicImage
							width="32px" height="32px" value="#{messageController.image}">
						</h:graphicImage>
						<h:outputText value="#{messageController.message}" 
						              styleClass="mensajealerta" style="white-space: normal"/>
                    </h:panelGrid>
                    <h:panelGrid columns="2">
						<h:commandButton id="acceptButtonMessageModal"
							value="Aceptar"
							action="#{messageController.getOutcome}"
							onclick="#{messageController.onclick}"
							styleClass="botonsmall">
						</h:commandButton>
						&nbsp;
						<h:commandButton id="cancelButtonMessageModal"
							value="Cancelar" 
							rendered="#{messageController.buttonvisible}"
							action="#{messageController.getCancelAction}"
							onclick="#{messageController.onclick}"
							styleClass="botonsmall">
						</h:commandButton>
					</h:panelGrid>						
                </a4j:outputPanel>
            </h:panelGrid>
	</h:panelGroup>
  </a4j:form>		
</rich:modalPanel>
